﻿namespace AgileZen
{
    using AgileZen.Models;

    public interface IAgileZenService
    {
        Person GetMe();

        Person GetMe(params string[] enrichments);

        void UpdateMe(ref Person me);

        Stories GetMyStories();

        Project GetProject(int projectid);

        Project GetProject(int projectid, params string[] enrichments);
        
        Projects GetProjects();
        
        Projects GetProjects(params string[] enrichments);

        People GetProjectMembers(int projectId);

        People AddProjectMember(int projectId, int[] members);

        People SetProjectMembers(int projectId, int[] members);

        void RemoveProjectMember(int projectId, int userId);

        void UpdateProject(int projectId, ref Project project);

        void CreateStory(int projectId, ref Story story);

        Stories GetStories(int projectId);

        Stories GetStories(int projectId, int tagId);

        Stories GetStories(int projectId, params string[] enrichments);

        Stories GetStories(int projectId, int tagId, params string[] enrichments);

        Stories SetStoriesForTag(int projectId, int tagId, int[] stories);
        
        Story SetTagsForStory(int projectId, int storyId, int[] tags);

        Story GetStory(int projectId, int storyId);

        Story GetStory(int projectId, int storyId, params string[] enrichments);

        void UpdateStory(int projectId, int storyId ,ref Story story);

        void DeleteStory(int projectId, int storyId);

        void CreatePhase(int projectId, ref Phase phase);

        Phases GetPhases(int projectId);

        Phase GetPhase(int projectId, int phaseId);

        void UpdatePhase(int projectId, ref Phase phase);

        void DeletePhase(int projectId, int phaseId);

        Phases ReorderPhases(int projectId, int[] order);
        
        void CreateRole(int projectId, ref Role role);

        Roles GetRoles(int projectId);

        Role GetRole(int projectId, int roleId);

        void UpdateRole(int projectId, ref Role role);

        void DeleteRole(int projectId, int roleId);

        People GetPeopleInRole(int projectId, int roleId);

        People AddPersonToRole(int projectId, int roleId, Person person);

        People SetMembersOfRole(int projectId, int roleId, int[] members);

        void RemoveMemberFromRole(int projectId, int roleId, int userId);

        void CreateTask(int projectId, int storyId, ref Task task);

        Task GetTask(int projectId, int storyId, int taskId);

        void UpdateTask(int projectId, int storyId, ref Task task);

        void DeleteTask(int projectId, int storyId, int taskId);

        Tasks ReorderTasks(int projectId, int storyId, int[] order);

        
        
        Comments GetComments(int projectId, int storyId);

        Comment GetComment(int projectId, int storyId, int commentId);

        Comment CreateComment(int projectId, int storyId, ref Comment comment);

        Comment UpdateComment(int projectId, int storyId, ref Comment comment);
        
        void DeleteComment(int projectId, int storyId, int commentId);
        


        void CreateTag(int projectId, ref Tag tag);

        void CreateTag(int projectId, int storyId, ref Tag tag);

        Tag GetTag(int projectId, int tagId);

        Tag GetTag(int projectId, int storyId, int tagId);

        Tags GetTags(int projectId);

        void UpdateTag(int projectId, ref Tag tag);

        void UpdateTag(int projectId, int storyId, ref Tag tag);

        void DeleteTag(int projectId, int tagId);

        void DeleteTag(int projectId, int storyId, int tagId);
    }
}
